<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core">
<h:head>
    <title>index</title>
    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8"/>
    <h:outputStylesheet library="css" name="tableCar-style.css"/>
    <f:view locale="#{userBean.locale}"/>

</h:head>
<h:body>
    <ui:decorate template="/sample.xhtml">
        <ui:define name="body">
            Автобарахолка
            <h:form>

                <h:commandButton value="Разместить свое объявление" action="/Advertisement/addCar"/> <br/>
            </h:form>
            <h:dataTable value="#{advertisements.cars}" var="car">
                <h:column>
                    <table class="simple-little-table" cellspacing='0'>
                        <tr>
                            <th>
                                <form  method="get" action="/car">
                                    ID:  <input type="text"  value="#{car.id}" name="id" size="1" readonly="readonly"/>

                                    <input type="submit" value="Перейти"  />
                                </form></th>
                            <th>Описание</th>
                            <th>Год</th>
                            <th>Цена</th>
                        </tr>
                        <!-- Table Header -->
                        <tr>
                            <td >
                                <h:graphicImage library="image" name="Car.png" height="150" width="150"/>
                            </td>
                            <td>***************************************************************************************************
                                <br/>
                                <div id="left">
                                #{car.transport.spr_brand.name_ru}, #{car.spr_model.name_ru} <br/>
                                  Тип транспорта :#{car.transport.spr_transportType.name_ru} Тип кузова : #{car.spr_carType.name_ru}  <br/>
                               Cостояние : #{car.transport.spr_condition.name_ru}<br/>
                               Привод: #{car.spr_privod.name_ru},  Объем двигателя :#{car.capasity}<br/>
                               Трансмиссия : #{car.spr_transmission.name_ru} <br/>
                                    Цвет : #{car.transport.spr_color.name_ru}<br/>
                                <br/>


                                </div>
                            </td>
                            <td>
                                *************
                                #{car.transport.issue_date}
                            </td>
                            <td>
                                *****************
                                <br/>
                                #{car.transport.price} #{car.transport.spr_currency.shortname_en}<br/></td>
                        </tr>
                        <!-- Darker Table Row -->

                    </table>
                </h:column>
            </h:dataTable>

        </ui:define>
    </ui:decorate>


</h:body>


</html>



